package com.wkk.authentication.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * @author : WangKeKe
 * @date : 2020/9/28 17:28
 * Description :
 */

@Data
@Accessors(chain = true)
@ApiModel(description = "用于用户登录JSON形式")
public class UserLoginDto {

    @NotEmpty(message = "用户名不能为空")
    @Length(min = 4, max = 20,message = "用户名长度需要在4-20个字符之间")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, max = 20, message = "密码需要在6-20个字符之间")
    @ApiModelProperty(value = "密码", required = true)
    private String password;
}
